<?php
namespace app\index\controller;
use app\CommonController;
use app\integration\HuobiApi;

class Kline extends CommonController
{


    public function getHistory()
    {
         $post = $this->request->post();
         $service = $this->app->make(HuobiApi::class);
         $data = $service->getHistory($post["interval"],$post["symbol"]);
         $this->result(["data"=>$data]);
    }

    public function polling()
    {
        $post = $this->request->post();
        $service = $this->app->make(HuobiApi::class);
        $data = $service->polling($post["symbol"]);
        $this->result(["data"=>$data]);
    }
}
